// vite.config.js
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; // 关键
// 如果还用了 Element-Plus 按需引入，下面两行也要保留
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";

export default defineConfig({
  plugins: [
    vue(), // ← 必加
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],
});
